home *** CD-ROM | disk | FTP | other *** search
- /** SendASCII.vlt
- *
- * VLT ASCII send test using xprascii.library. Note that these days it
- * is easier to use the Paste facility.
- *
- **/
- /*
- * Add libraries if necessary
- */
- if show("l", "rexxarplib.library") = 0 then do
- check = addlib('rexxsupport.library', 0, -30, 0)
- check = addlib('rexxarplib.library', 0, -30, 0)
- end
- /*
- * The following sequence determines both VLT's screen and port name
- */
- vltport = address()
- cols = ScreenCols(vltport)
- if cols == -1 then vltscreen = ""
- else vltscreen = vltport
- /*
- * Get last file sent
- */
- filename = getenv(vltasciifilnam)
- dirname = ""
- /*
- * Break up into file and dir
- */
- nf = lastpos("/", filename)
-
- if nf = 0 then do
- nf = lastpos(":", filename)
- if nf ~= 0 then do
- dirname = substr(filename, 1, nf)
- filename = substr(filename, nf + 1)
- end
- end
- else do
- dirname = substr(filename, 1, nf - 1)
- filename = substr(filename, nf + 1)
- end
- /*
- * Ask for file
- */
- filename = GetFile(50, 50, dirname, filename, "Enter File Name", vltscreen)
- if filename = "" then exit
- /*
- * Save filename to env var.
- */
- call setenv(vltasciifilnam, filename)
- /*
- * Find out the current settings
- */
- 'extract transferprotocol'
- 'extract currentxpr'
- /*
- * Select current transfer protocol
- */
- 'xpr select xprascii.library'
- 'transfer protocol external'
- 'xpr init 50'
- 'file send 'filename
- /*
- * Set protocol back to previous
- */
- 'xpr select 'VLT.currentxpr
- 'transfer protocol 'VLT.transferprotocol
- exit
-
-